org.eclipse.vtp.framework.engine.runtime
Class Process

java.lang.Object
  extended by org.eclipse.vtp.framework.engine.runtime.Scope
      extended by org.eclipse.vtp.framework.engine.runtime.Process
All Implemented Interfaces:
IProcess

public class Process
extends Scope
implements IProcess

Implementation of the process scope and context.

Author:
Lonnie Pryor

Nested Class Summary
protected  class Process.Context
          Implementation of the generic context.
 
Field Summary
protected  Blueprint blueprint
          The process blueprint.
protected  Process.Context context
          The generic context implementation.
 
Constructor Summary
Process(Blueprint blueprint, IProcessDescriptor descriptor)
          Creates a new Process.
 
Method Summary
 ISession createSession(ISessionDescriptor descriptor)
          Creates a new process engine session from the specified descriptor.
 java.lang.String getProcessID()
          Returns the ID of this process.
protected  java.util.Collection getServices(java.lang.String identifier)
           
protected  java.lang.Object[] lookupAllInScope(java.lang.String identifier)
           
 java.lang.Object[] lookupAllServices(java.lang.String identifier)
          Returns an array containing all the services registered under the specified identifier.
protected  java.lang.Object lookupInScope(java.lang.String identifier)
           
 java.lang.Object lookupService(java.lang.String identifier)
          Looks up the service selected for the specified identifier or null if no such service exists.
 
Methods inherited from class org.eclipse.vtp.framework.engine.runtime.Scope
getServiceInstance, registerImplicitServices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blueprint

protected final Blueprint blueprint
The process blueprint.


context

protected final Process.Context context
The generic context implementation.

Constructor Detail

Process

public Process(Blueprint blueprint,
               IProcessDescriptor descriptor)
        throws java.lang.NullPointerException
Creates a new Process.

Parameters:
blueprint - The process blueprint.
descriptor - The process descriptor.
Throws:
java.lang.NullPointerException - If the supplied blueprint is null.
java.lang.NullPointerException - If the supplied descriptor is null.
Method Detail

lookupInScope

protected java.lang.Object lookupInScope(java.lang.String identifier)
Overrides:
lookupInScope in class Scope

lookupAllInScope

protected java.lang.Object[] lookupAllInScope(java.lang.String identifier)
Overrides:
lookupAllInScope in class Scope

getServices

protected java.util.Collection getServices(java.lang.String identifier)
Specified by:
getServices in class Scope

getProcessID

public java.lang.String getProcessID()
Description copied from interface: IProcess
Returns the ID of this process.

Specified by:
getProcessID in interface IProcess
Returns:
The ID of this process.

lookupService

public java.lang.Object lookupService(java.lang.String identifier)
                               throws java.lang.NullPointerException
Description copied from interface: IProcess
Looks up the service selected for the specified identifier or null if no such service exists.

Specified by:
lookupService in interface IProcess
Parameters:
identifier - The identifier of the service to look up.
Returns:
The service selected for the specified identifier or null if no such service exists.
Throws:
java.lang.NullPointerException - If the supplied identifier is null.

lookupAllServices

public java.lang.Object[] lookupAllServices(java.lang.String identifier)
                                     throws java.lang.NullPointerException
Description copied from interface: IProcess
Returns an array containing all the services registered under the specified identifier.

Specified by:
lookupAllServices in interface IProcess
Parameters:
identifier - The identifier of the services to look up.
Returns:
An array containing all the services registered under the specified identifier.
Throws:
java.lang.NullPointerException - If the supplied identifier is null.

createSession

public ISession createSession(ISessionDescriptor descriptor)
                       throws java.lang.NullPointerException
Description copied from interface: IProcess
Creates a new process engine session from the specified descriptor.

Specified by:
createSession in interface IProcess
Parameters:
descriptor - The descriptor of the session to create.
Returns:
A new process engine session from the specified descriptor.
Throws:
java.lang.NullPointerException - If the specified descriptor is null.